<html>
<head><meta charset="utf-8"><title>Cancel salsa query · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cancel.20salsa.20query.html">Cancel salsa query</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="163868153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cancel%20salsa%20query/near/163868153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cancel.20salsa.20query.html#163868153">(Apr 21 2019 at 21:24)</a>:</h4>
<p>E.g. In the case of macro expansion, if there is a very deep expansion, how to cancel it? The ‘hir_parse’ is behind <code>salsa</code>, i can’t pass the  “stack counter”  in it.</p>



<a name="163868220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cancel%20salsa%20query/near/163868220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cancel.20salsa.20query.html#163868220">(Apr 21 2019 at 21:26)</a>:</h4>
<p>I think we shouldn't literally cancle this, we should just return a dummy result</p>



<a name="163868229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cancel%20salsa%20query/near/163868229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cancel.20salsa.20query.html#163868229">(Apr 21 2019 at 21:26)</a>:</h4>
<p>and yeah, I think the tricky bit here is figuring out how to pass in the stack counter...</p>



<a name="163868230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cancel%20salsa%20query/near/163868230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cancel.20salsa.20query.html#163868230">(Apr 21 2019 at 21:26)</a>:</h4>
<p>I guess, we could just add counter to <code>MacroCallLoc</code>?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>